<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" pageEncoding="UTF-8" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <%--这个是出现任何错误后，再次登陆所使用的登陆页面--%>
    <title>请登录</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="${pageContext.request.contextPath}/static/css/css.css" rel="stylesheet" type="text/css">

    <style type="text/css">
        #top{
            width:80%;
            height: 180px;
            background: cornflowerblue;
            margin-left: 130px;

        }
        #topc {
            width: 400px;
            height: 100px;
            font-family: 楷体;
            margin-left: 450px;
            padding-top: 45px;
        }

        #content {
            position: relative;
            top: 3px;
            width: 80%;
            height: 380px;
            margin: auto;
            overflow: hidden;
            z-index: 2;
        }

        .tab1 {
            position: relative;
            top: 100px;
            font-size: 24px;
        }

        #in1 {
            width: 250px;
            height: 30px;
            font-size: 24px;
        }

        #in3 {
            width: 250px;
            height: 30px;
            font-size: 24px;
        }

        #in2 {
            width: 80px;
            height: 28px;
        }

    </style>
    <script type="text/javascript">
        function checkId() {
            if (document.getElementById("in1").value == ""
                && document.getElementById("in3").value == "") {
                alert("请输入用户名和密码！");
                return false;
            } else if (document.getElementById("in1").value == "") {
                alert("请输入用户名");
                return false;
            } else if (document.getElementById("in3").value == "") {
                alert("请输入密码！");
                return false;
            } else {
                return true;
            }
        }
    </script>
</head>
<body>
<%--<%
    if (session.getAttribute("error").equals("error")) {
%>
<script type="text/javascript">
    alert("用户名或密码错误请重新登录！");
</script>
<%
    }
    session.setAttribute("error", "test");
%>--%>
<div id="top">
    <div class="topa">
        <div id="topc">
            <span style="font-size: 80px; color: black">宠物诊所</span>
        </div>
    </div>
</div>
<center>
    <div id="content">
        <c:if test="${msg!=null}">
            <span style="color: red">${msg}</span>
        </c:if>
        <form action="${pageContext.request.contextPath}/login/toPetSearch" method="post" onsubmit="return checkId()">
            <table border="0" cellpadding="0" cellspacing="2" class="tab1">
                <tr align="center">
                    <td>用户名</td>
                    <td><input type="text" name="username" id="in1"/></td>
                </tr>
                <tr align="center">
                    <td>密&nbsp;&nbsp;&nbsp;码</td>
                    <td><input type="password" name="password" id="in3"/></td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <input type="submit" value="登录" />
                        <input type="reset" value="重置" />
                        <a href="${pageContext.request.contextPath}/employee/toAdd"><font color="gray" size="3"><i>注册</i></font></a>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</center>
<jsp:include page="${pageContext.request.contextPath}/footer.jsp" flush="true"/>

</body>
</html>

